package cn.kshost.zqyg.user.controller;

import cn.kshost.zqyg.model.vo.common.Result;
import cn.kshost.zqyg.model.vo.common.ResultCodeEnum;
import cn.kshost.zqyg.user.service.SmsService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user/sms")
@Tag(name = "短信业务")
public class SmsController {
    @Autowired
    private SmsService smsService;
    @Operation(summary = "注册发送短信")
    @GetMapping("/sendCode/{phone}")
    public Result sendRegisterCode(@PathVariable("phone") String phone){
        smsService.sendRegisterSmsCode(phone);
       return   Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
